/*
 * @Author: zhao 13370229059@163.com
 * @Date: 2024-03-25 22:18:19
 * @LastEditors: zhao 13370229059@163.com
 * @LastEditTime: 2024-07-09 15:40:22
 * @FilePath: \dance\uni_modules\uv-ui-tools\libs\mixin\mpShare.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
export default {
  async onShow() {
    let pages = uni.$uv.pages();
    let url = pages[pages.length - 1]?.$page?.fullPath || '';
    let path = `${url}${url.includes('?') ? '&' : '?'}${url.includes('isShare') ? '' : 'isShare=1'}`;
    uni.$uv.mpShare = {
      title: '#去卡#按次付费，无需囤卡，#小小跳舞,快来拿捏~', // 默认为小程序名称
      path, // 默认为当前页面路径路径
      imageUrl: '' // 默认为当前页面的截图
    };
  },
  onShareAppMessage() {
    return uni.$uv.mpShare;
  }
};
